<?php /* Smarty version 2.6.6, created on 2013-10-21 21:18:01
         compiled from upload.tpl */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'stripslashes', 'upload.tpl', 173, false),array('insert', 'get_audio_categories', 'upload.tpl', 203, false),)), $this); ?>
<?php echo '
    <style type="text/css">		
        .upload-progress {
            border:1px dashed #333333;
            width:500px;
            height:50px;
        }

        .upload-progress div.meter {
            width:0px;
            height:15px;
            font-size:1px;
            background-color:#fe03b4;
            margin-left:10px;
            margin-top:1px;
            border:1px solid black;
        }

        .upload-progress div.readout {
            padding:5px 0px 0px 12px;
            font-family:"Courier New", Courier, monospace;
            font-size:10px;
            line-height:10px;
        }

        .upload-progress div.readout span {
            font-weight:bold;
        }
    </style>
'; ?>

<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<!--<script type="text/javascript">/*<![CDATA[*/ google.load("jquery", "1.3.2"); /*]]>*/</script> -->
<script type="text/javascript">/*<![CDATA[*/ google.load("jqueryui", "1.7.2"); /*]]>*/</script>
<script type="text/javascript">
    var $j = jQuery.noConflict();
</script>
<script type="text/javascript" src="<?php echo $this->_tpl_vars['baseurl']; ?>
/js/jquery.uploadprogress.0.3.js"></script>
<?php echo '
    <script type="text/javascript">
    jQuery(function () {
            jQuery(\'#upload_form\').uploadProgress({ 
                    progressURL:\'upload.php\',
                    displayFields : [\'kb_uploaded\',\'kb_average\',\'est_sec\'],
                    start: function() { 
                            jQuery(\'input[type=submit]\',this).val(\'';  echo $this->_tpl_vars['lang119'];  echo '\');
                    },
                    success: function() { 
                            jQuery(\'input[type=submit]\',this).val(\'';  echo $this->_tpl_vars['lang454'];  echo '\');
                            jQuery(this).get(0).reset();
                            document.getElementById(\'smsg\').style.display="block";
                    }
            });
    });
    </script>
    <script type="text/javascript">
    function checkuploadForm()
    {
            title = document.getElementById("title").value;
            tags = document.getElementById("tags").value;
            artist = document.getElementById("artist").value;
            desc = document.getElementById("vwdescription").value;
            category = document.getElementById("category").value;
            audio_file = document.getElementById("audio_file").value;
	
            if (title == "")
            {
                    hideAllErrors();
                    document.getElementById("titleError").style.display = "block";
                    document.getElementById("title").select();
                    document.getElementById("title").focus();
                    return false;
            } 
            else if (tags == "")
            {
                    hideAllErrors();
                    document.getElementById("tagsError").style.display = "block";
                    document.getElementById("tags").select();
                    document.getElementById("tags").focus();
                    return false;
            }
            else if(artist == "")
            {
                    hideAllErrors();
                    document.getElementById("artistError").style.display = "block";
                    document.getElementById("artist").select();
                    document.getElementById("artist").focus();
                    return false;
            }
            else if (desc == "")
            {
                    hideAllErrors();
                    document.getElementById("vwdescriptionError").style.display = "block";
                    document.getElementById("vwdescription").select();
                    document.getElementById("vwdescription").focus();
                    return false;
            }
            else if (category == "0")
            {
                    hideAllErrors();
                    document.getElementById("categoryError").style.display = "block";
                    return false;
            }
            else if (audio_file == "")
            {
                    hideAllErrors();
                    document.getElementById("fileError").style.display = "block";
                    return false;
            }
            else if (audio_file != "")
            {
                    if (LimitAttach("upload_form", audio_file))
                    {
                            return true;
                    }
                    else
                    return false;
            }
	
            return true;
    }

    function LimitAttach(form, file)
    {
            extArray = new Array(".mp3", ".MP3");
            allowSubmit = false;
            if (!file) return;
            while (file.indexOf("\\\\") != -1)
            file = file.slice(file.indexOf("\\\\") + 1);
            ext = file.slice(file.lastIndexOf(".")).toLowerCase();
            for (var i = 0; i < extArray.length; i++) {
            if (extArray[i] == ext) { allowSubmit = true; break; }
            }
            if (allowSubmit) return true;
            else
            alert("';  echo $this->_tpl_vars['lang121'];  echo '  "
            + (extArray.join("  ")) + "\\n';  echo $this->_tpl_vars['lang120'];  echo '");
            return false;
    }
 
    function hideAllErrors() 
    {
            document.getElementById("titleError").style.display = "none"
            document.getElementById("tagsError").style.display = "none"
            document.getElementById("vwdescriptionError").style.display = "none"
            document.getElementById("categoryError").style.display = "none"
            document.getElementById("fileError").style.display = "none"
    }

    function uploadPreCheck() 
    {
            if (checkuploadForm())
            {		
                    hideAllErrors();
                    jQuery(\'#upload_form\').submit();
            }
            else
             return false;
    }
    </script>
'; ?>

<div id="main_wrap">
    <div class="center_wrap clearfix">
        <h2><?php echo $this->_tpl_vars['lang797']; ?>
</h2>
        <div id="public_wrap_sm">
            <?php if ($this->_tpl_vars['error2'] != '1'): ?>
                <form name="upload_form" id="upload_form" enctype="multipart/form-data" action="<?php echo $this->_tpl_vars['baseurl']; ?>
/upload.php" method="POST">
                    <input type="hidden" name="UPLOAD_IDENTIFIER" id="UPLOAD_IDENTIFIER" value="<?php echo $this->_tpl_vars['upload_id']; ?>
" />
                    <div id="smsg" class="errorPage clearfix" style="display:none">
                        <h2 style="font-size:18px"><?php echo $this->_tpl_vars['lang167']; ?>
</h2>
                    </div>
                    <p>
                        <label for="user_login"><?php echo $this->_tpl_vars['lang324']; ?>
</label>
                        <input name="title" id="title" type="text" value="<?php echo ((is_array($_tmp=$this->_tpl_vars['title'])) ? $this->_run_mod_handler('stripslashes', true, $_tmp) : stripslashes($_tmp)); ?>
" size="30" /><br />
                    <div class="uerror" id="titleError"><?php echo $this->_tpl_vars['lang854']; ?>
</div>
                    </p>
                    <p>
                        <label for="user_password"><?php echo $this->_tpl_vars['lang325']; ?>
</label>
                        <input type="text" name="tags" value="<?php echo ((is_array($_tmp=$this->_tpl_vars['tags'])) ? $this->_run_mod_handler('stripslashes', true, $_tmp) : stripslashes($_tmp)); ?>
" size="30" id="tags" /><br/>
                    <div class="uerror" id="tagsError"><?php echo $this->_tpl_vars['lang855']; ?>
</div>
                    </p>              
                    <p>
                        <label for="artist">Artist</label>
                        <input type="text" name="artist" value="<?php echo ((is_array($_tmp=$this->_tpl_vars['artist'])) ? $this->_run_mod_handler('stripslashes', true, $_tmp) : stripslashes($_tmp)); ?>
" size="30" id="artist" /><br/>
                        <div class="uerror" id="artistError">Error: Please enter artist name.</div>
                    </p>   
                    <p>
                        <label for="country">Country</label>
                        <select id="artist_country" name="artist_country">
                            <option value="">Select country</option>
                        <?php echo $this->_tpl_vars['countriesList']; ?>

                        </select><br/>
                        <div class="uerror" id="countryError">Error: Please select a country.</div>    
                    </p>
                    <p>
                        <label for="user_password"><?php echo $this->_tpl_vars['lang113']; ?>
</label>
                        <textarea name="vwdescription" id="vwdescription" rows="4" cols="35"><?php echo ((is_array($_tmp=$this->_tpl_vars['desc'])) ? $this->_run_mod_handler('stripslashes', true, $_tmp) : stripslashes($_tmp)); ?>
</textarea><br/>
                    <div class="uerror" id="vwdescriptionError"><?php echo $this->_tpl_vars['lang856']; ?>
</div>
                    </p> 
                    <p>
                        <label for="user_login"><?php echo $this->_tpl_vars['lang218']; ?>
</label>
                        <select id="category" name="category" style="font-size:14px; width:260px;">
                            <option value="0"><?php echo $this->_tpl_vars['lang115']; ?>
</option>
                            <?php require_once(SMARTY_CORE_DIR . 'core.run_insert_handler.php');
echo smarty_core_run_insert_handler(array('args' => array('name' => 'get_audio_categories', 'assign' => 'listaudiocategories')), $this); ?>

                            <?php unset($this->_sections['o']);
$this->_sections['o']['name'] = 'o';
$this->_sections['o']['loop'] = is_array($_loop=$this->_tpl_vars['listaudiocategories']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['o']['show'] = true;
$this->_sections['o']['max'] = $this->_sections['o']['loop'];
$this->_sections['o']['step'] = 1;
$this->_sections['o']['start'] = $this->_sections['o']['step'] > 0 ? 0 : $this->_sections['o']['loop']-1;
if ($this->_sections['o']['show']) {
    $this->_sections['o']['total'] = $this->_sections['o']['loop'];
    if ($this->_sections['o']['total'] == 0)
        $this->_sections['o']['show'] = false;
} else
    $this->_sections['o']['total'] = 0;
if ($this->_sections['o']['show']):

            for ($this->_sections['o']['index'] = $this->_sections['o']['start'], $this->_sections['o']['iteration'] = 1;
                 $this->_sections['o']['iteration'] <= $this->_sections['o']['total'];
                 $this->_sections['o']['index'] += $this->_sections['o']['step'], $this->_sections['o']['iteration']++):
$this->_sections['o']['rownum'] = $this->_sections['o']['iteration'];
$this->_sections['o']['index_prev'] = $this->_sections['o']['index'] - $this->_sections['o']['step'];
$this->_sections['o']['index_next'] = $this->_sections['o']['index'] + $this->_sections['o']['step'];
$this->_sections['o']['first']      = ($this->_sections['o']['iteration'] == 1);
$this->_sections['o']['last']       = ($this->_sections['o']['iteration'] == $this->_sections['o']['total']);
?>
                                <option value="<?php echo $this->_tpl_vars['listaudiocategories'][$this->_sections['o']['index']]['CATID']; ?>
" <?php if ($this->_tpl_vars['category'] == $this->_tpl_vars['listaudiocategories'][$this->_sections['o']['index']]['CATID']): ?>selected="selected"<?php endif; ?>><?php echo $this->_tpl_vars['listaudiocategories'][$this->_sections['o']['index']]['name']; ?>
</option>
                            <?php endfor; endif; ?>
                        </select><br />
                    <div class="uerror" id="categoryError"><?php echo $this->_tpl_vars['lang462']; ?>
</div>
                    </p>

                    <p>
                    <div style="height:10px;"></div>
                    <?php echo $this->_tpl_vars['lang329']; ?>
:&nbsp;
                    <input class="check" type="radio" value="1" name="public" id="public" checked> <?php echo $this->_tpl_vars['lang327']; ?>
&nbsp;&nbsp;&nbsp;
                    <input class="check" type="radio" value="0" name="public" id="public"> <?php echo $this->_tpl_vars['lang328']; ?>

                    <div style="height:10px;"></div>

                    <?php echo $this->_tpl_vars['lang330']; ?>
:&nbsp;
                    <input class="check" type="radio" value="1" name="allowcomments" id="allowcomments" checked> <?php echo $this->_tpl_vars['lang335']; ?>
&nbsp;&nbsp;&nbsp;
                    <input class="check" type="radio" value="0" name="allowcomments" id="allowcomments"> <?php echo $this->_tpl_vars['lang336']; ?>

                    <div style="height:10px;"></div>

                    <?php echo $this->_tpl_vars['lang331']; ?>
:&nbsp;
                    <input class="check" type="radio" value="1" name="allowratings" id="allowratings" checked> <?php echo $this->_tpl_vars['lang335']; ?>
&nbsp;&nbsp;&nbsp;
                    <input class="check" type="radio" value="0" name="allowratings" id="allowratings"> <?php echo $this->_tpl_vars['lang336']; ?>

                    <div style="height:10px;"></div>

                    <?php echo $this->_tpl_vars['lang332']; ?>
:&nbsp;
                    <input class="check" type="radio" value="1" name="allowembeds" id="allowembeds" checked> <?php echo $this->_tpl_vars['lang335']; ?>
&nbsp;&nbsp;&nbsp;
                    <input class="check" type="radio" value="0" name="allowembeds" id="allowembeds"> <?php echo $this->_tpl_vars['lang336']; ?>

                    <div style="height:10px;"></div>

                    <?php echo $this->_tpl_vars['lang333']; ?>
:&nbsp;
                    <input class="check" type="radio" value="1" name="allowdownloads" id="allowdownloads" checked> <?php echo $this->_tpl_vars['lang335']; ?>
&nbsp;&nbsp;&nbsp;
                    <input class="check" type="radio" value="0" name="allowdownloads" id="allowdownloads"> <?php echo $this->_tpl_vars['lang336']; ?>

                    <div style="height:10px;"></div>
                    </p>

                    <p>
                        <label for="audio_file"><?php echo $this->_tpl_vars['lang210']; ?>
</label>
                        <input type="file" name="audio_file" id="audio_file" class="textField" size="30"/><br /><small>(<?php echo $this->_tpl_vars['lang148']; ?>
 <?php echo $this->_tpl_vars['lang149']; ?>
)</small><br />
                    <div class="uerror" id="fileError"><?php echo $this->_tpl_vars['lang857']; ?>
</div>
                    </p>

                    <p>
                        <label for="audiopictureimage"><?php echo $this->_tpl_vars['lang299']; ?>
</label>
                        <input type="file" name="audiopictureimage" id="audiopictureimage" class="textField" size="30"/><br /><small>(<?php echo $this->_tpl_vars['lang211']; ?>
)</small>
                    </p>

                   <!-- <p>
                    <div class="upload-progress">
                        <div class="readout">
                            <span class="kb_uploaded">0</span> <?php echo $this->_tpl_vars['lang69']; ?>
 - <span class="kb_average">0</span> <?php echo $this->_tpl_vars['lang70']; ?>
 <br/><span class="est_sec">0</span> <?php echo $this->_tpl_vars['lang73']; ?>

                        </div>
                        <div class="meter"></div>
                    </div>
                    </p>-->

                    <p>
                        <input type="button" name="upload_button" id="upload_button" value="<?php echo $this->_tpl_vars['lang177']; ?>
" onClick="uploadPreCheck();" />
                    </p>

                </form>
            <?php else: ?>
                <div class="errorPage clearfix">
                    <h2 style="font-size:18px"><?php echo $this->_tpl_vars['lang835']; ?>
</h2>
                </div>
            <?php endif; ?>

        </div>      
        <div class="clear"></div>
    </div>
</div>